package com.tubi.阻塞队列;

import java.util.concurrent.ArrayBlockingQueue;

public class Demo1 {
    public static void main(String[] args) {
        //创建阻塞队列
//        容量1
        ArrayBlockingQueue<String> list = new ArrayBlockingQueue<>(1);

        //创建线程 并开始
        Cooker c = new Cooker(list);
        Foodie f = new Foodie(list);

        c.start();
        f.start();
    }
}
